/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package message;

import folders2.ProjectFile;
import java.io.File;
import java.io.IOException;

/**
 *
 * @author Administrator
 */
public interface MessageFolderInterface {

    /**
     * This method is used to add attachment to message folder
     * @param path
     */
    void addAttachment(String path);

    /**
     * This method is used to find message components in agiven folder
     * and set message data(this method used when user want to read his messages )
     * @param u folder which contains message data (message data....>> files && attachment folder)
     * @throws java.io.IOException
     */
    void findMessageComponent(File u) throws IOException;

    /**
     * This method is used to get attachment list which contains pathes
     * @return singleList of pathes
     */
    Attachment getAttach();

    /**
     * This method is used to get reference of attachment folder
     * @return reference to attachment folder
     */
    ProjectFile getAttachFolder();

    /**
     * This method is used to get reference of message folder
     * @return reference to message folder which contains all data
     */
    ProjectFile getMessFolder();

    /**
     * This method is used to get reference of messInfo file which contains all message data
     * @return reference to messInfo
     */
    ProjectFile getMessInfo();

    /**
     * This method is used to get message object
     * @return message object
     */
    Message getSms();

    /**
     * This method is used to get reference of message text file
     * @return reference of message text file
     */
    ProjectFile getText();

    /**
     * This method is used to copy all attachment from pathes in attachment list
     * to message attachment folder
     * @throws java.io.IOException
     */
    void moveTo() throws IOException;

    /**
     * This method is used to read message text from message text file
     * @return result of type String which contains all text in formation
     * @throws java.io.IOException
     */
    String readTextFile() throws IOException;

    /**
     * This method is used to set attachment list which contains pathes
     * @param attach new attachment pathes
     */
    void setAttach(Attachment attach);

    /**
     * This method is set reference of attachment folder
     * @param attachFolder new reference of attachment folder
     */
    void setAttachFolder(ProjectFile attachFolder);

    /**
     * This method is used to set reference of message folder
     * @param messFolder new reference of message folder
     */
    void setMessFolder(ProjectFile messFolder);

    /**
     * This method is used to set reference of messInfo file which contains all message data
     * @param messInfo new reference of messInfo
     */
    void setMessInfo(ProjectFile messInfo);

    /**
     * This method is used to set message object
     * @param sms new message object
     */
    void setSms(Message sms);

    /**
     * This method is used to set reference of message text file
     * @param text new reference of text file
     */
    void setText(ProjectFile text);

    /**
     * This method is used to write text file
     * @param words message text
     * @throws java.io.IOException
     */
    void writeFileText(String words) throws IOException;

    /**
     * This method is used to write message information
     * @throws java.io.IOException
     */
    void writeMessageInfo() throws IOException;

}
